//
//  Wallet.swift
//  Monujo
//
//  Created by user on 2024/1/3.
//
//

import Foundation
import SwiftData


@Model 
public class Wallet {
    var name: String
    var balance: Double
    var updateTime: Date
    var importTime: Date
    
    @Relationship(deleteRule: .cascade, inverse: \Address.wallet)
    var addressList: [Address] = []
    
    init(name: String = "Default Name", balance: Double = 0.0, updateTime: Date = .now, importTime: Date = .now) {
        self.name = name
        self.balance = balance
        self.updateTime = updateTime
        self.importTime = importTime
    }
    
}
